# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
# Contributor: Cedric Girard <girard.cedric@gmail.com>

pkgname=p8-platform
pkgver=2.1.0.1
pkgrel=4
pkgdesc="Platform support library used by libCEC and binary add-ons for Kodi"
arch=('loong64' 'x86_64')
url="https://github.com/Pulse-Eight/platform"
license=('GPL')
conflicts=('libplatform')
replaces=('libplatform')
makedepends=('cmake')
depends=('gcc-libs')
source=(https://github.com/Pulse-Eight/platform/archive/p8-platform-${pkgver}.tar.gz)
sha256sums=('064f8d2c358895c7e0bea9ae956f8d46f3f057772cb97f2743a11d478a0f68a0')

build() {
  cd "$srcdir"/platform-p8-platform-${pkgver}
  cmake . \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_SHARED_LIBS=1 \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib \
    -DCMAKE_INSTALL_LIBDIR_NOARCH=/usr/lib
  make
}

package() {
  cd "$srcdir"/platform-p8-platform-${pkgver}
  make DESTDIR="$pkgdir/" install
}

# vim:set ts=2 sw=2 et:
